package com.t373.anno.service;

import com.t373.anno.mapper.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Jane
 * @date 2024-12-11 12:03
 */
@Service("goodsService")//标记当前这个类是业务层的对象 同时交给了Spring进行管理  创建,执行,销毁
public class GoodsServiceImpl implements GoodsService{

    //给属性赋值
    @Autowired //自动注入
    GoodsMapper goodsMapper;

    @Override
    public int count() {
        System.out.println("service");
        return goodsMapper.getGoodsCount();
    }
}
